<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>5-4 原型对像创建方法案例</title>
</head>
<body>
<script>
function Clothes(color,people){
this.color = color;
this.people = people;
}
Clothes.prototype.type = '';
Clothes.prototype.Clothes_fun = function(){
    alert('这个' + this.color + '是' + this.people + '穿的衣服');
};

var Clothes1 = new Clothes('黑色连衣裙','小丽');
var Clothes2 = new Clothes('黄色吊带裙','小美');

Clothes1.Clothes_fun();
Clothes2.Clothes_fun();
Clothes2.type = '吊带裙';
alert('小美穿的衣服是' + Clothes2.color + Clothes2.type);

</script>
</body>
</html>